<template>
    <div class="home-content">
        <!-- 首页上方的背景块 -->
        <div class="home-top-background"></div>
        <!-- 搜索设置登录 -->
        <div class="home-top-content">
            <span>登录</span>
            <input type="text" class="home-search">
            <span>设置</span>
        </div>
        <!-- 快捷连接 -->
        <div class="grid-content">
            <ul>
                <li v-for="(i,index) in gridList" :key="index">
                    <div>
                        <!-- <span :style="{packground:i.gridColor}" :calss="i.gridIcon"></span> -->
                        <p>{{ i.gridName }}</p>
                    </div>
                </li>
            </ul>
        </div>
        <!-- 轮播图 -->
        <div></div>
    </div>
</template>

<script>
export default {
    data(){
        return{
            gridList:[
                {gridName:"推荐",gridIcon:"",gridUrl:"",gridColor:""},
                {gridName:"校园文化",gridIcon:"",gridUrl:"",gridColor:""},
                {gridName:"活动",gridIcon:"",gridUrl:"",gridColor:""},
                {gridName:"充值入口",gridIcon:"",gridUrl:"",gridColor:""},
                {gridName:"更多",gridIcon:"",gridUrl:"",gridColor:""},
            ]
        }
    }
}
</script>

<style lang="less" scoped>
    .home-content{
        padding-top: 45px;
        .home-top-background{
            width: 100%;
            height: 100px;
            background: linear-gradient(0deg,#5B66B6,#0AB0D5 50%);
            border-bottom-left-radius: 30px;
            border-bottom-right-radius: 30px;
            position: absolute;
            z-index: 1;
        }
        .home-top-content{
            position: fixed;
            top: 0;
            z-index: 1000;
            width: 100%;
            display: flex;
            justify-content: space-around;
            align-items: center;
            background: #0AB0D5;
            padding: 50px;
            color: rgb(255, 255, 255);
            .home-search{
                width: 70%;
                border: 1px solid #000;
                height: 50px;
                border-radius: 20px;
                color: black;
                outline: none;
                text-indent: 30px;
            }
        }
        .grid-content{
            position: relative;
            z-index: 100;
            background: #fff;
            width: 100%;
            margin: 100px 0%;
            background: #c5c5c5f5;
            ul{
                display: flex;
                flex-wrap: wrap;
                li{
                    width: 20%;
                    max-width: 20%;
                    min-width: 20%;
                    display: flex;
                    justify-content: center;
                    padding: 20px 0;
                    div{
                        text-align: center;
                        span{
                            font-size: 28px;
                            color: rgb(0, 0, 0);
                            width: 40px;
                            line-height: 40px;
                            border-radius: 10px;
                        }
                    }
                }
            }
        }
    }
    .recommend-content{
        display: flex;
        flex-wrap: wrap;
        justify-items: center;
        justify-content: center;
        padding-bottom: 40px;
        margin-top: 10px;
        li{
            width: 48%;
            flex-direction: column;
            .recommend-top{
                img{
                    width: 176px;
                    height: 176px;
                }
            }
            .recommend-details{
                width: 98%;
                height: 35px;
                overflow: hidden;
                text-overflow: ellipsis;
                display: -webkit-box;
                -webkit-line-clamp: 2;
                -webkit-box-orient: vertical;
            }
            .recommend-bottom{
                display: flex;
                height: 35px;
                justify-content: space-between;
                padding: 0 4px;
                align-items: center;
                .recommend-price{
                    font-weight: bold;
                    color: #5B66B6;
                }
                .recommend-see{
                    border: .5px solid #000;
                    height: 18px;
                    padding: 2px;
                    text-align: center;
                }
            }
        }
    }
    
</style>